// babel-preset-taro 更多选项和默认值：
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
module.exports = {
  plugins: [
    ['import', {
      libraryName: 'react-use',
      camel2DashComponentName: false,
      customName(/** @type {string} */ name) {
        const libraryDirectory = name.startsWith('Use')
          ? 'lib/component'
          : name.startsWith('create')
            ? 'lib/factory'
            : 'lib';
        return `react-use/${libraryDirectory}/${name}`;
      },
    }, 'react-use'],
    ['import', {
      libraryName: '@nutui/nutui-react-taro',
      libraryDirectory: 'dist/esm',
      style: 'css',
      camel2DashComponentName: !1,
    }, 'nutui-react-taro'],
  ],
  presets: [
    ['taro', {
      framework: 'react',
      ts: !0,
    }],
  ],
};
